import axios from 'axios'

// 设置服务器地址
axios.defaults.baseURL = 'http://sell.h5.itsource.cn:8087'
// 设置超时时间
axios.defaults.timeout = 30000

// 请求拦截器
axios.interceptors.request.use(config => {
    config.headers.authorization = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NjE2ODYsImN0aW1lIjoiMjAyMi0xMi0xMlQxMDo0MTowMC4wMDBaIiwiYWNjb3VudCI6ImFiY2RlIiwicGFzc3dvcmQiOiJhMTIzNDU2IiwidXNlckdyb3VwIjoi6LaF57qn566h55CG5ZGYIiwiaW1nVXJsIjoiaHR0cDovL3NlbGwuaDUuaXRzb3VyY2UuY246ODA4Ny9pbWdzL2RlZmF1bHQucG5nIiwicGlkIjo2MTUwNywiaWF0IjoxNjcwOTg0OTA3LCJleHAiOjE2NzE1ODk3MDd9.iXS1_lQsQpurAcpS9WOSVTSZk0Ox59wNhFQU8ox3Q1s'
    return config
})

export default axios